<template>
  <div class="cont-wrapper no-sidebar">
    <div class="block-container container">
      <div class="title">全部消息</div>
      <div class="notify-container">
        <ul class="notify-list">
          <li v-for="(item, idx) in notifyList" :key="idx" :class="[item.isImportant? 'hot' : '']">
            <span class="nl-icon" v-if="item.isImportant">
              <i class="icon i-hot" ></i>
            </span>
            <span class="sys">[系统]</span>
            <span class="cont">{{item.describe}}</span>
            <!-- <span class="date">{{item.date}}</span> -->
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'examine',
  data () {
    return {
      loading: false,
      notifyList: []
    }
  },
  methods: {
    // 获取审核编排列表
    getExamineList () {
      let that = this
      that.loading = true
      this.$http.getAllOrganize().then(res => {
        if (res.size > 0) {
          this.notifyList = res.data
        } else {
          this.notifyList = []
        }
        that.loading = false
      })
    }
  },
  mounted () {
    this.getExamineList()
  }
}
</script>

<style lang="scss" scoped>
.notify-container {
  border-top: 1px solid #f0f0f0;
  .notify-list{
    position: relative;
    left: 0px;
    top: 10px;
    li{
      margin-bottom: 20px;
      font-size: 14px;
      color: #666666;
      .nl-icon{
        width: 30px;
        display: inline-block;
        text-align: center;
      }
      .icon{
        background-position: center;
        background-size: contain;
        display: inline-block;
        margin: auto;
        vertical-align: middle;
      }
      .i-hot{
        background-image: url('../assets/img/sidebar/hot.png');
        width: 11px;
        height: 13px;
      }
      .sys{
        margin-right: 10px;
        font-weight: bold;
      }
      .cont{
        margin-right: 20px;
      }
      .date{
        color: #b3b3b3;
      }
      &.hot {
        position: relative;
        left: -12px;
      }
    }
  }
}
</style>
